dom.wrapTag()

Availability 3.0
Description Wraps the specified tag around the current selection. If the selection is unbalanced, Dreamweaver reports an error.
Arguments startTag
The argument is the source associated with the opening tag.
Returns Nothing.
Enabler None.
Example The following code wraps a link around the current selection:
var theDOM = dw.getDocumentDOM();
var theSel = theDOM.getSelectedNode();
if (theSel.nodeType == Node.TEXT_NODE){
  theDOM.wrapTag('<a href="foo.html">');
}